<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>测试气泡效果</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">

<style type="text/css">
/*
   对话气泡
   用法：使用.speech-bubble和.speech-bubble-DIRECTION类
   <div class="speech-bubble speech-bubble-top">Hi there</div>
*/
 
.speech-bubble {
  position: relative;
  background-color: #292929;
 
  width: 200px;
  height: 150px;
  line-height: 150px; /* 垂直居中 */
  color: white;
  text-align: center;
  border-radius: 10px;
  font-family: sans-serif;
}
 
.speech-bubble:after {
  content: '';
  position: absolute;
 
  width: 0;
  height: 0;
 
  border: 15px solid;
}
 
/* 箭头的位置 */
.speech-bubble-top:after {
  border-bottom-color: #292929;
  left: 50%;
  bottom: 100%;
  margin-left: -15px;  
}
.speech-bubble-right:after {
  border-left-color: #292929;
 
  left: 100%;
  top: 50%;
  margin-top: -15px;   
}
 
.speech-bubble-bottom:after {
  border-top-color: #292929;
  top: 100%;
  left: 50%;
  margin-left: -15px;  
}
 
.speech-bubble-left:after {
  border-right-color: #292929;
  top: 50%;
  right: 100%;
  margin-top: -15px;   
}
.triangle_up
{
  height:0px; width:0px;
  border-bottom:50px solid #006633;
  border-left:50px solid transparent;
  border-right:50px solid transparent;
}
.triangle_down
{
  height:0px; width:0px;
  border-top:50px solid #006633;
  border-left:50px solid transparent;
  border-right:50px solid transparent;
}
.triangle_left
{
  height:0px; width:0px;
  border-left:50px solid #006633;
  border-top:50px solid transparent;
  border-bottom:50px solid transparent;
  /*float:left;*/
}

.triangle_right
{
  height:0px; width:0px; /*float:left;*/
  border-right:50px solid #006633;
  border-top:50px solid transparent;
  border-bottom:50px solid transparent;
}
.crossSquare
{
  height:0px; width:0px;
  border-right:50px solid blue;
  border-top:50px solid gray;
  border-bottom:50px solid red;
  border-left:50px solid yellow;
}
</style>


</head>
<body>
<div class="triangle_right"></div>
<div class="triangle_left"></div>
<div class="triangle_up"></div>
</br>
</br>
  <div class="triangle_down"></div>
  <div class="crossSquare"></div>
</br>
</br>

<div class="speech-bubble speech-bubble-top">
            箭头在顶部
        </div>
         <br/>
        <div class="speech-bubble speech-bubble-bottom">
            箭头在底部
        </div>
        <br/>
        <div class="speech-bubble speech-bubble-left">
            箭头在左侧
        </div>
         <br/>
        <div class="speech-bubble speech-bubble-right">
            箭头在右侧
        </div>
</body>
</html> 